package cn.rulian.base.curd.bo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import cn.rulian.base.common.bo.BaseBo;

/**
 * 一个属性，记录一个bo属性在自动生成代码时的相关配置信息。 </br>
 */
@Entity
@Table(name = "base_curd_curdfield")
public class CurdField extends BaseBo {
	
	@ManyToOne
	@JoinColumn(name = "curd_id")
	private Curd curd; //主对象
	
	@Column(length = 50)
	private String fieldName; //属字名，用于和bo类属性进行匹配

	@Column(length = 200)
	private String fieldType; //属性类型，取全类名。生成配置时，和bo类实际属性比对，判断是否修改了类型，以决定是否重新生成配置。
	
	@Column(length = 50)
	private String showName; //显示名称
	
	private String defaultValue; //默认值
	
	private Boolean showInList; //是否显示：列表
	
	private Boolean showInAdd; //是否显示：增加页面
	
	private Boolean showInUpdate; //是否显示：编辑页面
	
	private Boolean showInDetail; //是否显示：详情页面
	
	private Integer sn; //顺序号（列表、查询条件、配置页面）
	
	private Integer snAdd; //显示顺序号：增加页
	
	private Integer snUpdate; //显示顺序号：编辑 页
	
	private Integer snDatail; //显示顺序号：详情页
	
	private Boolean canSum; //是否合计
	
	private Boolean sumTitle; //是否是合计标题（即显示“本页合计”、“总合计”的位置）
	
	private Boolean canSearch; //是否作为查询条件
	
	private Boolean excelType; //是否作为Excel导出时的分表条件

	private Boolean listSortable; //是否允许排序
	
	private Integer listWidth; //列宽

	@Column(length = 50)
	private String listFormatter; //列表：格式化器（该属性值由明细配置时根据不同情况写入，不让用户页面选择。保留该值是为简化页面生成代码逻辑）

	@Column(length = 20)
	private String listAlign; //列表：对齐方式

	@Column(length = 20)
	private String addType; //增加（编辑 ）类型
	
	private Boolean addRequired; //是否必填
	
	private Boolean otherBo; //属性类型是否是其他bo

	@Column(length = 200)
	private String addSelectUrl; //增加时：下拉数据URL

	@Column(length = 200)
	private String parameter; //参数：String：固定序列、String：URL取值属性、其他bo：URL显示属性、Boolean：true显示值

	private String parameterData; //针对于固定序列加工后的值，在子配置保存时加工数据
	
	@Column(length = 50)
	private String falseShow; //false显示值

	@Column(length = 200)
	private String remark; //备注

	public Curd getCurd()
	{
		return curd;
	}

	public void setCurd(Curd curd)
	{
		this.curd = curd;
	}

	public String getFieldName()
	{
		return fieldName;
	}

	public void setFieldName(String fieldName)
	{
		this.fieldName = fieldName;
	}

	public String getFieldType()
	{
		return fieldType;
	}

	public void setFieldType(String fieldType)
	{
		this.fieldType = fieldType;
	}

	public String getShowName()
	{
		return showName;
	}

	public void setShowName(String showName)
	{
		this.showName = showName;
	}

	public String getDefaultValue()
	{
		return defaultValue;
	}

	public void setDefaultValue(String defaultValue)
	{
		this.defaultValue = defaultValue;
	}

	public Boolean getShowInList()
	{
		return showInList;
	}

	public void setShowInList(Boolean showInList)
	{
		this.showInList = showInList;
	}

	public Boolean getShowInAdd()
	{
		return showInAdd;
	}

	public void setShowInAdd(Boolean showInAdd)
	{
		this.showInAdd = showInAdd;
	}

	public Boolean getShowInUpdate()
	{
		return showInUpdate;
	}

	public void setShowInUpdate(Boolean showInUpdate)
	{
		this.showInUpdate = showInUpdate;
	}

	public Boolean getShowInDetail()
	{
		return showInDetail;
	}

	public void setShowInDetail(Boolean showInDetail)
	{
		this.showInDetail = showInDetail;
	}

	public Integer getSn()
	{
		return sn;
	}

	public void setSn(Integer sn)
	{
		this.sn = sn;
	}

	public Integer getSnAdd()
	{
		return snAdd;
	}

	public void setSnAdd(Integer snAdd)
	{
		this.snAdd = snAdd;
	}

	public Integer getSnUpdate()
	{
		return snUpdate;
	}

	public void setSnUpdate(Integer snUpdate)
	{
		this.snUpdate = snUpdate;
	}

	public Integer getSnDatail()
	{
		return snDatail;
	}

	public void setSnDatail(Integer snDatail)
	{
		this.snDatail = snDatail;
	}

	public Boolean getCanSum()
	{
		return canSum;
	}

	public void setCanSum(Boolean canSum)
	{
		this.canSum = canSum;
	}

	public Boolean getSumTitle()
	{
		return sumTitle;
	}

	public void setSumTitle(Boolean sumTitle)
	{
		this.sumTitle = sumTitle;
	}

	public Boolean getCanSearch()
	{
		return canSearch;
	}

	public void setCanSearch(Boolean canSearch)
	{
		this.canSearch = canSearch;
	}

	public Boolean getExcelType()
	{
		return excelType;
	}

	public void setExcelType(Boolean excelType)
	{
		this.excelType = excelType;
	}

	public Boolean getListSortable()
	{
		return listSortable;
	}

	public void setListSortable(Boolean listSortable)
	{
		this.listSortable = listSortable;
	}

	public Integer getListWidth()
	{
		return listWidth;
	}

	public void setListWidth(Integer listWidth)
	{
		this.listWidth = listWidth;
	}

	public String getListFormatter()
	{
		return listFormatter;
	}

	public void setListFormatter(String listFormatter)
	{
		this.listFormatter = listFormatter;
	}

	public String getListAlign()
	{
		return listAlign;
	}

	public void setListAlign(String listAlign)
	{
		this.listAlign = listAlign;
	}

	public String getAddType()
	{
		return addType;
	}

	public void setAddType(String addType)
	{
		this.addType = addType;
	}

	public Boolean getAddRequired()
	{
		return addRequired;
	}

	public void setAddRequired(Boolean addRequired)
	{
		this.addRequired = addRequired;
	}

	public String getRemark()
	{
		return remark;
	}

	public void setRemark(String remark)
	{
		this.remark = remark;
	}

	public String getAddSelectUrl()
	{
		return addSelectUrl;
	}

	public void setAddSelectUrl(String addSelectUrl)
	{
		this.addSelectUrl = addSelectUrl;
	}

	public Boolean getOtherBo()
	{
		return otherBo;
	}

	public void setOtherBo(Boolean otherBo)
	{
		this.otherBo = otherBo;
	}

	public String getParameter()
	{
		return parameter;
	}

	public void setParameter(String parameter)
	{
		this.parameter = parameter;
	}

	public String getFalseShow()
	{
		return falseShow;
	}

	public void setFalseShow(String falseShow)
	{
		this.falseShow = falseShow;
	}

	public String getParameterData()
	{
		return parameterData;
	}

	public void setParameterData(String parameterData)
	{
		this.parameterData = parameterData;
	}

}
